<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > 
<HTML>
<HEAD>
<TITLE></TITLE>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 7.0">
<link rel="stylesheet" type="text/css" href="../Meta.css">
</HEAD>
<BODY>
<H1>UndefinedVariableException</H1>
<H2>What it means</H2>
<P>This exception means that the program tried to use a variable that hadn't 
been given a value.&nbsp; The <FONT face=Arial>variable</FONT> field of the 
exception tells you the name of the variable.</P>
<H2>What causes it</H2>
<P>Generally, this means one of two things:</P>
<UL>
  <LI>You forgot to write the part of your code that defines the variable</LI>
  <LI>You wrote it but forgot to execute it</LI>
  <LI>You mistyped the name of the variable, either in the place where you used 
  it or else in your definition (so that you were really defining it under the 
  wrong name).</LI></UL>
<P>Occasionally, this can also be due to mistyping the name of the operator in 
your expression.&nbsp; For example, if you mistype the name "with" as in:</P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <P><FONT face=Arial>[woth x = 1<BR>&nbsp;&nbsp; [+ x 1]]</FONT></P></BLOCKQUOTE>
<P dir=ltr>Here, because you mistyped the keyword <FONT face=Arial>with</FONT>, 
the system thinks you're trying to call a procedure <FONT face=Arial>woth</FONT> 
with the arguments <FONT face=Arial>x</FONT>, <FONT face=Arial>=</FONT>, <FONT 
face=Arial>1</FONT>, and <FONT face=Arial>[+ x 1]</FONT>.&nbsp; Most of the time 
this will fail because it will look for the value of the variable <FONT 
face=Arial>x</FONT> (because it needs its value to pass as an argument to the 
supposed <FONT face=Arial>woth</FONT> procedure) and find there is no variable 
<FONT face=Arial>x</FONT>.</P>
<H2>What to do</H2>
<P>First, check the offending expression.</P>
<UL>
  <LI>Is the variable name misspelled?&nbsp; If so, fix it.</LI>
  <LI>If not, find the code that was supposed to define the variable.&nbsp; Is 
  it misspelled?&nbsp; If so, fix it and rerun it to define the variable.</LI>
  <LI>If not, try executing the definition again just to make sure that it 
  really did get executed.</LI>
  <LI>If that still doesn't work, go back to the offending expression and look 
  to see if it or the surrounding expression has any misspelled 
keywords.</LI></UL>
<P>&nbsp;</P>



</BODY>
</HTML>
